//
//  ProcessUtils.m
//  CarTown
//
//  Created by xionghao on 15/9/9.
//  Copyright (c) 2015年 熊浩. All rights reserved.
//

#import "ProcessUtils.h"
#import "Process.h"
@implementation ProcessUtils
+(void)getProcess:(void (^)(bool))su{
    
        NSMutableDictionary *params=[NSMutableDictionary dictionary];
        params[@"action"]=@"process";
        [PostUitls Post:qburl parameters:params success:^(id response) {
            
            NSDictionary *dict=response;
            
            NSNumber *state=dict[@"state"];
            
            if ([state integerValue]==400) {
                [Process addProcess:dict[@"data"]];
            }
            if (su) {
                su(YES);
            }
            
        } failure:^(NSError *error) {
            if (su) {
                su(NO);
            }
        }];

}
@end
